#ifndef MYMUSIC_H
#define MYMUSIC_H


#include <QWidget>
#include <QStyleOption>
#include <QPainter>
#include <QDir>
#include<QListWidgetItem>
#include<QMediaPlayer>

QT_BEGIN_NAMESPACE
namespace Ui { class mymusic; }
QT_END_NAMESPACE

class mymusic : public QWidget
{
    Q_OBJECT

public:
    mymusic(QWidget *parent = nullptr);
    ~mymusic();

private:
    Ui::mymusic *ui;



private:
    QString str_pathmusic;
    QListWidgetItem *p_item;
    bool b_play_music=false;
    QMediaPlayer *p_player;
    QString str_music;
    int n_music_number;
private:
    void paintEvent(QPaintEvent *event);
    void readFile();
    void initUI();
private slots:
    void slots_last_clicked();
    void slots_next_clicked();
    void slots_pause_clicked();
    void slot_musicListRowNum(int);
    void on_listWidget_2_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
};
#endif // MYMUSIC_H
